using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class InitRequest : GeneratedMessageLite<InitRequest, InitRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<InitRequest, InitRequest.Builder>
		{
			private bool resultIsReadOnly;
			private InitRequest result;
			protected override InitRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override InitRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override InitRequest DefaultInstanceForType
			{
				get
				{
					return InitRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public SKBuiltinString_t UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public uint SyncKey
			{
				get
				{
					return this.result.SyncKey;
				}
				set
				{
					this.SetSyncKey(value);
				}
			}
			public SKBuiltinString_t Buffer
			{
				get
				{
					return this.result.Buffer;
				}
				set
				{
					this.SetBuffer(value);
				}
			}
			public string Language
			{
				get
				{
					return this.result.Language;
				}
				set
				{
					this.SetLanguage(value);
				}
			}
			public Builder()
			{
				this.result = InitRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(InitRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private InitRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					InitRequest other = this.result;
					this.result = new InitRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override InitRequest.Builder Clear()
			{
				this.result = InitRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override InitRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new InitRequest.Builder(this.result);
				}
				return new InitRequest.Builder().MergeFrom(this.result);
			}
			public override InitRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override InitRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is InitRequest)
				{
					return this.MergeFrom((InitRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override InitRequest.Builder MergeFrom(InitRequest other)
			{
				return this;
			}
			public override InitRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override InitRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(InitRequest._initRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = InitRequest._initRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 18u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							BaseRequest.Builder builder = BaseRequest.CreateBuilder();
							if (this.result.hasBaseRequest)
							{
								builder.MergeFrom(this.BaseRequest);
							}
							input.ReadMessage(builder, extensionRegistry);
							this.BaseRequest = builder.BuildPartial();
							continue;
						}
						if (num3 == 18u)
						{
							SKBuiltinString_t.Builder builder2 = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasUserName)
							{
								builder2.MergeFrom(this.UserName);
							}
							input.ReadMessage(builder2, extensionRegistry);
							this.UserName = builder2.BuildPartial();
							continue;
						}
					}
					else
					{
						if (num3 == 24u)
						{
							this.result.hasSyncKey = input.ReadUInt32(ref this.result.syncKey_);
							continue;
						}
						if (num3 == 34u)
						{
							SKBuiltinString_t.Builder builder3 = SKBuiltinString_t.CreateBuilder();
							if (this.result.hasBuffer)
							{
								builder3.MergeFrom(this.Buffer);
							}
							input.ReadMessage(builder3, extensionRegistry);
							this.Buffer = builder3.BuildPartial();
							continue;
						}
						if (num3 == 42u)
						{
							this.result.hasLanguage = input.ReadString(ref this.result.language_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public InitRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public InitRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public InitRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public InitRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public InitRequest.Builder SetUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public InitRequest.Builder SetUserName(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = builderForValue.Build();
				return this;
			}
			public InitRequest.Builder MergeUserName(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasUserName && this.result.userName_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.userName_ = SKBuiltinString_t.CreateBuilder(this.result.userName_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.userName_ = value;
				}
				this.result.hasUserName = true;
				return this;
			}
			public InitRequest.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = null;
				return this;
			}
			public InitRequest.Builder SetSyncKey(uint value)
			{
				this.PrepareBuilder();
				this.result.hasSyncKey = true;
				this.result.syncKey_ = value;
				return this;
			}
			public InitRequest.Builder ClearSyncKey()
			{
				this.PrepareBuilder();
				this.result.hasSyncKey = false;
				this.result.syncKey_ = 0u;
				return this;
			}
			public InitRequest.Builder SetBuffer(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = value;
				return this;
			}
			public InitRequest.Builder SetBuffer(SKBuiltinString_t.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBuffer = true;
				this.result.buffer_ = builderForValue.Build();
				return this;
			}
			public InitRequest.Builder MergeBuffer(SKBuiltinString_t value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBuffer && this.result.buffer_ != SKBuiltinString_t.DefaultInstance)
				{
					this.result.buffer_ = SKBuiltinString_t.CreateBuilder(this.result.buffer_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.buffer_ = value;
				}
				this.result.hasBuffer = true;
				return this;
			}
			public InitRequest.Builder ClearBuffer()
			{
				this.PrepareBuilder();
				this.result.hasBuffer = false;
				this.result.buffer_ = null;
				return this;
			}
			public InitRequest.Builder SetLanguage(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasLanguage = true;
				this.result.language_ = value;
				return this;
			}
			public InitRequest.Builder ClearLanguage()
			{
				this.PrepareBuilder();
				this.result.hasLanguage = false;
				this.result.language_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int UserNameFieldNumber = 2;
		public const int SyncKeyFieldNumber = 3;
		public const int BufferFieldNumber = 4;
		public const int LanguageFieldNumber = 5;
		private static readonly InitRequest defaultInstance;
		private static readonly string[] _initRequestFieldNames;
		private static readonly uint[] _initRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasUserName;
		private SKBuiltinString_t userName_;
		private bool hasSyncKey;
		private uint syncKey_;
		private bool hasBuffer;
		private SKBuiltinString_t buffer_;
		private bool hasLanguage;
		private string language_ = "";
		private int memoizedSerializedSize = -1;
		public static InitRequest DefaultInstance
		{
			get
			{
				return InitRequest.defaultInstance;
			}
		}
		public override InitRequest DefaultInstanceForType
		{
			get
			{
				return InitRequest.DefaultInstance;
			}
		}
		protected override InitRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public SKBuiltinString_t UserName
		{
			get
			{
				return this.userName_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public uint SyncKey
		{
			get
			{
				return this.syncKey_;
			}
		}
		public SKBuiltinString_t Buffer
		{
			get
			{
				return this.buffer_ ?? SKBuiltinString_t.DefaultInstance;
			}
		}
		public string Language
		{
			get
			{
				return this.language_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.hasUserName && this.hasSyncKey && this.hasBuffer && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeMessageSize(2, this.UserName);
				}
				if (this.hasSyncKey)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.SyncKey);
				}
				if (this.hasBuffer)
				{
					num += CodedOutputStream.ComputeMessageSize(4, this.Buffer);
				}
				if (this.hasLanguage)
				{
					num += CodedOutputStream.ComputeStringSize(5, this.Language);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private InitRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] initRequestFieldNames = InitRequest._initRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, initRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasUserName)
			{
				output.WriteMessage(2, initRequestFieldNames[4], this.UserName);
			}
			if (this.hasSyncKey)
			{
				output.WriteUInt32(3, initRequestFieldNames[3], this.SyncKey);
			}
			if (this.hasBuffer)
			{
				output.WriteMessage(4, initRequestFieldNames[1], this.Buffer);
			}
			if (this.hasLanguage)
			{
				output.WriteString(5, initRequestFieldNames[2], this.Language);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasSyncKey)
			{
				num ^= this.syncKey_.GetHashCode();
			}
			if (this.hasBuffer)
			{
				num ^= this.buffer_.GetHashCode();
			}
			if (this.hasLanguage)
			{
				num ^= this.language_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			InitRequest initRequest = object_0 as InitRequest;
			return initRequest != null && (this.hasBaseRequest == initRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(initRequest.baseRequest_))) && (this.hasUserName == initRequest.hasUserName && (!this.hasUserName || this.userName_.Equals(initRequest.userName_))) && (this.hasSyncKey == initRequest.hasSyncKey && (!this.hasSyncKey || this.syncKey_.Equals(initRequest.syncKey_))) && (this.hasBuffer == initRequest.hasBuffer && (!this.hasBuffer || this.buffer_.Equals(initRequest.buffer_))) && (this.hasLanguage == initRequest.hasLanguage && (!this.hasLanguage || this.language_.Equals(initRequest.language_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<InitRequest, InitRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<InitRequest, InitRequest.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<InitRequest, InitRequest.Builder>.PrintField("SyncKey", this.hasSyncKey, this.syncKey_, writer);
			GeneratedMessageLite<InitRequest, InitRequest.Builder>.PrintField("Buffer", this.hasBuffer, this.buffer_, writer);
			GeneratedMessageLite<InitRequest, InitRequest.Builder>.PrintField("Language", this.hasLanguage, this.language_, writer);
		}
		public static InitRequest ParseFrom(byte[] data)
		{
			return InitRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private InitRequest MakeReadOnly()
		{
			return this;
		}
		public static InitRequest.Builder CreateBuilder()
		{
			return new InitRequest.Builder();
		}
		public override InitRequest.Builder ToBuilder()
		{
			return InitRequest.CreateBuilder(this);
		}
		public override InitRequest.Builder CreateBuilderForType()
		{
			return new InitRequest.Builder();
		}
		public static InitRequest.Builder CreateBuilder(InitRequest prototype)
		{
			return new InitRequest.Builder(prototype);
		}
		static InitRequest()
		{
			InitRequest.defaultInstance = new InitRequest().MakeReadOnly();
			InitRequest._initRequestFieldNames = new string[]
			{
				"BaseRequest",
				"Buffer",
				"Language",
				"SyncKey",
				"UserName"
			};
			InitRequest._initRequestFieldTags = new uint[]
			{
				10u,
				34u,
				42u,
				24u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.InitRequest.Descriptor, null);
		}
	}
}
